package team.southcat.wsyygh.user.controllor;

import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import team.southcat.wsyygh.common.result.Result;
import team.southcat.wsyygh.model.pojo.user.Patient;
import team.southcat.wsyygh.model.pojo.user.PatientVo;
import team.southcat.wsyygh.user.service.PatientService;

import java.util.List;


@Api(tags = "患者接口")
@RestController
@RequestMapping("/admin/user/patient")
public class PatientController {

    @Autowired
    private PatientService patientService;

    @GetMapping("/getPatientById/{id}")
    public Result getPatientById(@PathVariable Long id){
        Patient patient = patientService.getPatientById(id);
        return Result.ok(patient);
    }

    @GetMapping("/getById/{id}")
    public Patient getById(@PathVariable Long id){
        return patientService.getById(id);
    }

}
